package factory.absfactory;

/**
 * @ProjectName: interview
 * @Package: factory.absfactory
 * @ClassName: LDFactory
 * @Author: chenmengqi
 * @Description:
 * @Date: 2020/2/13 9:32 下午
 * @Version: 1.0
 */
public class LDFactory implements AbsFactory {

    @Override
    public Pizza createPizza(String orderType) {
        System.out.println("~使用的是抽象工厂模式~");
        Pizza pizza = null;
        if (orderType.equals("cheese")) {
            pizza = new LDCheesePizza();
        } else if (orderType.equals("pepper")) {
            pizza = new LDPepperPizza();
        }
        return pizza;
    }

}
